﻿<Window x:Class="ControleRepresentanteSync.View.Wizard.WizardWindow"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" 
        xmlns:View="clr-namespace:ControleRepresentanteSync.View"
        Title="Controle Representante Sync" Height="500" Width="900"
        DataContextChanged="WindowDataContextChanged" WindowStartupLocation="CenterScreen"
        KeyDown="WindowKeyDown">
    <Window.Resources>
        <ResourceDictionary>
            <View:VisibilityConverter x:Key="visibilityConverter" />
            <View:VisibilityConverter x:Key="notVisibilityConverter" IsInverse="True" />
        </ResourceDictionary>
    </Window.Resources>
    <DockPanel Margin="10">
        <TextBlock DockPanel.Dock="Top" FontSize="18" Foreground="#5c87b2" Text="{Binding Path=CurrentPage.Title}" />
        <Border BorderBrush="#5c87b2" BorderThickness="0.5" DockPanel.Dock="Top" />
        <TextBlock Text="{Binding Path=CurrentPage.Description}" DockPanel.Dock="Top"
                   Margin="0,10,0,0" TextWrapping="Wrap" TextAlignment="Justify" />
        <Grid DockPanel.Dock="Bottom" Margin="0,10,0,0">
            <Grid.ColumnDefinitions>
                <ColumnDefinition Width="Auto" />
                <ColumnDefinition Width="Auto" />
                <ColumnDefinition />
            </Grid.ColumnDefinitions>
            <Button Content="&lt; Anterior" IsEnabled="{Binding Path=CanGoBack}" Click="GoBackClick" Width="80" />
            <Button Content="Próximo &gt;" Grid.Column="1" IsEnabled="{Binding Path=CurrentPage.IsValid}" Click="GoForwardClick" Visibility="{Binding Path=IsFinish, Converter={StaticResource notVisibilityConverter}}" Width="80" Margin="5,0,0,0" />
            <Button Content="Finalizar" Grid.Column="1" IsEnabled="{Binding Path=CurrentPage.IsValid}" Click="GoForwardClick"  Visibility="{Binding Path=IsFinish, Converter={StaticResource visibilityConverter}}" Width="80" Margin="5,0,0,0" />
            <Button Content="Cancelar" Grid.Column="2" HorizontalAlignment="Right" Click="CancelClick" Width="80" />
        </Grid>
        <Border BorderBrush="#5c87b2" BorderThickness="0.5" DockPanel.Dock="Bottom" />
        <ContentControl Content="{Binding Path=CurrentPage}" Margin="0,20,0,10" />
    </DockPanel>
</Window>
